#include<stdio.h>
int main()
{
	double x,y;
	scanf("%lf",&x);
	if(x<=50)
	{
		y=0.53*x;
	}
	else
	{
		int temp=x-50;
		y=50*0.53+temp*0.58;
	}
	printf("%g",y);
	return 0;
}
